
var scenarioList = [
    {
        id:1,
        title:'眼镜行业',
        summary: ['眼镜实体门店','眼镜批发商'],
        name: 'GLASSES INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_001_yanjinghengye.png'
    },
    {
        id:2,
        title:'医药行业',
        summary: ['医院','药店','社区医院','卫生院'],
        name: 'MEDICAL INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_002_yiyaohengye.png'
    },
    {
        id:3,
        title:'零售行业',
        summary: ['商场', '超市', '步行街', '高端潮流品牌店', '服装品牌店'],
        name: 'RETAIL INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_003_lingshouhengye.png'
    },
    {
        id:4,
        title:'公共交通行业',
        summary:['地铁站', '火车站', '高铁站', '机场', '高速服务区'],
        name: 'PUBLIC INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_004_gonggongjiaotonghengye.png'
    },
    {
        id:5,
        title:'酒店餐饮行业',
        summary: ['酒店大堂','人员密集等候排队饭店'],
        name: 'HOTEL INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_005_jiudiancanyinhengye.png'
    },
    {
        id:6,
        title:'娱乐休闲行业',
        summary: ['影院门口','高端美容美发店','旅游景区','游乐园'],
        name: 'LEISURE INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_006_yulexiuxianhengye.png'
    },
    {
        id:7,
        title:'其他',
        summary: ['写字楼','学校教学楼','……'],
        name: 'OTHER INDUSTRY',
        cover:'https://bym-website.gz.bcebos.com/assets/production-try-on/Product_sdgmytj_yycj_007_qita.png'
    }
];


new Vue({

    data:{
        isActive: false,
        windowHeight:0
    },
    methods:{
        //设置元素状态
        setActive: function( el, stateName ){

            if( el.getBoundingClientRect().top < this.windowHeight ){
                this[stateName] = true;
            }
            if( el.getBoundingClientRect().bottom < 0 || el.getBoundingClientRect().top > this.windowHeight ){
                this[stateName] = false;
            }
        },
        //设置视窗高度
        setWindowHeight:function(){
            this.windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
        }
    },

    mounted:function(){
        var self = this;
        //初始化视窗高度
        self.setWindowHeight();
        window.onResize = debounce( function(){
            self.setWindowHeight();
        } ,200);

        window.onscroll = debounce(function(){
            self.setActive( self.$refs['picture'], "isActive" );
        }, 200);


    }


}).$mount('#configure');
